/*!
 * @file opp.h
 * @brief Phone book access profile related defination
 * @par Copyright (C) 2008 ALPS ELECTRIC CO., LTD
 */

#ifndef OPP_H_
#define OPP_H_

#define OPP_NO_TRANSFER		0
#define OPP_IN_TRANSFER		1
#define	OPP_FINISH_TRANSFER		2
typedef enum 
{
	/*! @brief OPP stop */
	oppNone,
	
	/*! @brief OPP is ready to use */
	oppReady,
	
	/*! @brief OPP in use */
	oppBusy
} oppState;

typedef enum 
{
	/*! @brief opp Flowcontrol go */
	oppFcGo,
	
	/*! @brief opp Flowcontrol stop */
	oppFcStop
} oppFc;

/*!
	@brief OPP data.
*/
typedef struct{
	/*!	opp state*/
	oppState		opp_state;
	
	/*!	opp data transfer status use for flow-control*/
	uint8			opp_status;
	uint8			opp_ifheader;
	oppFc			opp_fc;	//0-go, non-0 stop data transfer.
	uint8			data_continue;
	uint8			opp_limit_con;
}OPP;

/****************************************************************************
 * Includes
 ****************************************************************************/
#include "../alps_app/private.h"
void oppUpdateState(oppState state);
int oppHostHandler(uint16 op_code, param_data* param);
int oppProfileHandler(UCHAR op_code, param_data* data);
void oppAcceptHandler(uint8 status, uint8 op_code);

#endif /*OPP_H_*/
